package edu.hawaii.duedates.email;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;


/**
 * Tests the Mailer class which sends out messages containing Due Dates
 * output to a specified email address.
 * 
 * @author tylerwolff and Scheller Sanchez.
 *
 */
public class TestMailer {

  /**
   * Tests that an email was successfully sent out to user.
   */
  //@Test //Temporarily disabiled until add system property values.
  public void testMailer () {
    Mailer mail = new Mailer();
    assertTrue("Test successful mailer instance", mail.send("wolfft@hawaii.edu", "mail.hawaii.edu", 
        "Test Message"));
  }
  
  /**
   * Tests an email that was unsuccessfully sent out to user.
   */
  @Test
  public void testUnsuccessfulMailer () {
    Mailer mail = new Mailer();
    assertFalse("Test unsuccessful mailer", mail.send("invalidtestemail@hawaii.edu", 
        "mail.hawaii.edu", "bad Message"));
  }
}
